Repository navigation
Select the ordinary DSH session file in the host adapter - #9902
Conversation
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6.2-sol · OpenAI · runtime_reported · xhigh
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
动机 / Motivation
使用普通 DSH run-once、详细计划或同目录 managed operation 会话的调用者。同一 Goal、Agent 和 Todo 可在 Host Session 存储中同时有普通 SDK 和 managed operation 绑定。移动文件选择的归属时要保持两个旧文件的身份与各自恢复语义。 共同基线在共享文件存储通过 ordinary_dsh 布尔选项决定后缀和配置校验。普通记录为 .dsh-sdk.json,操作和 Codex 沿 .json。 候选让内置 DSH 提供明确 NativeSessionFile,并由计划、恢复和初始化共同使用。哈希、文件字节、Goal lifetime 与重复结算语义沿用原存储。 独立复验覆盖准确源码配合真实 DSH SDK/runtime 与脚本 loopback。operation 的独立证据是现有持久化选择器。作者另记录精确 wheel 与 0.1.5rc1 原生 operation 资格。
审读 3fcd532ccdcec5c45a901cf6610f686c32fc0a4f,目标基线 abbd0fad2f564344cf52bb1db01a59b4078b40d4。
改动思路 / Approach
仅调整内置 DSH 普通记录格式的声明、选择和存储接线,复用已有 native session 决策与持久化合同。 将普通 SDK 格式实参沿原存储通道传递,避免新 schema、迁移和重复身份判定。 真实内置宿主的固定文件合同,既有 Goal fence、作用域和 lineage 决定会话身份。原结算 journal 决定重放。 在轻量 DSH 模块声明现有格式,实际读取和写入拿同一对象并保留原配置摘要拒绝。
具体改动 / Changes
same-address 既有普通 SDK 文件地址和原生历史保持。sibling-independence 同 Todo 的 operation 记录由原选择器读回。record-refusal 不合格普通文件不得启动和结算。以共同基线实际 DSH 0.2.2rc2 写出普通记录,同一 Todo 再由原存储 owner 建 operation 兄弟记录。File 与 SQLite 的候选和基线均续跑同一原生 assistant 历史。operation 选择器可独立读回兄弟记录,普通续接与已结算重放保持两个文件字节。 公开接口、文件名以及显式 fresh 注入边界保持原合同。 当前契约
关键代码讲解
- 内置 DSH 声明普通 SDK 记录的既有后缀并绑定 dsh 宿主。 DSH_SDK_SESSION_FILE
- 计划与恢复把普通 DSH 路由映射到该文件合同。 codex_cli_session_binding
- 使用同一文件合同选择、检测冲突和创建普通会话。 _prepare_dsh_session
- 要求宿主、持久身份及有效原生配置摘要,拒绝 operation 格式。 select_codex_cli_session
对主干的风险 / Risks
同一 Todo 的两个记录如果误用同一文件或接受错误 profile,会接入错误历史。以实际保存的字节和独立模型端点请求复核。 两存储的已写普通文件被标为 operation 或存入不完整摘要时,普通 run-once 在模型请求、独立验收和扣额前拒绝。原错误记录和 operation 文件原样保存。正常重放新增三项副作用均为零。 714 项扩围通过。8 组独立跨版本、后端和无效格式组合通过,标准预合并无阻断,维护性日志与共同基线完全一致。
语义与 CI 对齐
标准预合并 6 项直检通过。12/13 项选中验证通过,1 项告警。没有阻断执行失败。 完整维护性告警与共同基线相同。
我的整体评价 / Verdict
独评通过。 当前精确提交无阻断发现。普通与 operation 会话分开选择、拒绝和恢复。两类后端的原生历史与记录字节复验一致,重放保持原结算,PR 保持开放。
English verdict: APPROVE at 3fcd532. Exact-head File and SQLite runs preserve the legacy ordinary DSH history and the neighboring operation record. Invalid SDK record formats fail before model I/O, validation or debit, and replay adds no side effects.
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> # Conflicts: # loopx/control_plane/turn_driver/codex_sessions.py
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · Codex maintainer agent (GPT) · self_reported
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
APPROVE at 826f533. This head resolves the ordinary_dsh to NativeSessionFile migration against the latest maintree snapshot owner: select_codex_cli_session and _select_codex_cli_session_snapshot carry session_file consistently, while legacy codex_cli_session_binding maps its compatibility boolean at the boundary. Full replan-successor 60/60 and DSH/session 7/7 pass; Ruff passes, and all review threads are resolved.
Change
Declare the ordinary DSH SDK session file in the built-in host descriptor. The Turn session reader and DSH creation path use that same declaration for the existing filename and native profile checks. The existing plan and recovery inputs still select their current route, and both use the same file digest, Goal lifetime and identity checks.
The shared persistence code receives a file format. The ordinary SDK continues to use its existing
.dsh-sdk.jsonrecord, while managed operation tools and Codex continue to use their existing records. No data migration or new CLI argument is needed.Validation
abbd0fad2f56and3fcd532ccdcewith the published DSH SDK and runtime0.2.2rc2, File and SQLite authority providers and a deterministic loopback model. A prior SDK session restored its native history with its existing record beside a managed-operation record. An operation-marked or malformed-profile SDK record failed before the model request or another quota debit. Replaying the settled Turn added no model request or debit. The sibling record stayed byte-identical.0.1.5rc1SDK/runtime also passed the native retained operation tests on both backends at base and head. These cover the existing approval/profile binding and the existing refusal to resume persisted history on this SDK.Integration
This change covers persistence. The runtime eligibility and scope decisions are separate and the exact heads of #9889, #9894 and #9898 merge without additional conflicts. The same is true of #9833. The OAR engine migration in #9861 has its own old-session compatibility requirement and its existing conflicts remained the same.
The proposed context strategy in #9864 changes the return value of the same storage function. A local combined tree retained that return value and the shared file validation, and 57 focused integration tests passed. The original strategy and author branches are independent.